// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   CourseScheduleValidator.java

package com.nervytech.tutorcruise.spring.form.validator;

import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;

@Component("courseScheduleValidator")
public class CourseScheduleValidator
{
    public void validate(Object target, Errors errors)
    {
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "fees", "NotEmpty.createCourseScheduleForm.fees", "Course Fee must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "currency", "NotEmpty.createCourseScheduleForm.currency", "Currency must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "totalSeats", "NotEmpty.createCourseScheduleForm.totalSeats", "Total seats must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "locationId", "NotEmpty.createCourseScheduleForm.locationId", "Location must be selected");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "stDate", "NotEmpty.createCourseScheduleForm.stDate", "Start Date must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "endDate", "NotEmpty.createCourseScheduleForm.endDate", "End Date must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "stTime", "NotEmpty.createCourseScheduleForm.stTime", "Start Time must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "endTime", "NotEmpty.createCourseScheduleForm.endTime", "End Time must be provided");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "timeZone", "NotEmpty.createCourseScheduleForm.timeZone", "Timezone must be provided");
    }
}
